package cn.eeepay.framework.util;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class ThreadFactory {

    private final static Object syncLock = new Object();
    private static int maxThreadInPool = 150;
    private static ExecutorService executor = null;

    public static ExecutorService getThread(){
        if(executor==null){
            synchronized (syncLock){
                if(executor==null){
                    executor = Executors.newFixedThreadPool(maxThreadInPool);
                }
            }
        }
        return executor;
    }

}
